package com.mpw.cloud.controller;

import com.mpw.cloud.entities.CommonResult;
import com.mpw.cloud.entities.Payment;
import com.mpw.cloud.service.PaymentFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program:Cloud
 * @author: mpw
 * @Time: 2021/11/1  15:55
 **/
@RestController
@Slf4j
public class OrderFergnController {

    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping(value = "/consumer/payment/get/{id}")
    public CommonResult<Payment> PaymentById(@PathVariable("id") Long id){

                 return paymentFeignService.getPaymentById(id);
    }
}
